#pragma once

#include<iostream>
#include<assert.h>

using namespace std;

class Date
{
public:
	 friend ostream& operator<<(ostream& out, const Date& d);
	 friend istream& operator>>(istream& cin,  Date& d);
	 Date(int year = 1, int month = 1, int day = 1);
	

	void print()
	{
		cout << _year << "-" << _month << "-" << _day << endl;
	}
	bool operator<(const Date& x);
	bool operator==(const Date& x);
	bool operator<=(const Date& x);
	bool operator>(const Date& x);
	bool operator>=(const Date& x);
	bool operator!=(const Date& x);

	Date& operator+=(int day);
	Date operator+(int day);
	Date operator-(int day);
	Date& operator-=(int day);
	Date& operator++();

	//int getday(Date x);

private:
	int _year;
	int _month;
	int _day;
};


ostream& operator<<(ostream& out, const Date& d);
istream& operator>>(istream& cin,  Date& d);